package com.fangcang.message.email.util;

import javax.mail.Authenticator;
import javax.mail.PasswordAuthentication;

public class EmailAuthenticator extends Authenticator {
	
	private String userName=null;
	
    private String password=null;
    
    public EmailAuthenticator(String username, String password){
    	this.userName = username;
    	this.password = password;
    }
    
    protected PasswordAuthentication getPasswordAuthentication(){
        return new PasswordAuthentication(userName, password);
    }
}
